package com.example.lianjuan.ui.activeity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.example.lianjuan.R;
import com.example.lianjuan.Utils.LogUtils;
import com.example.lianjuan.ui.custom.TextFlowLayout;

import java.util.ArrayList;
import java.util.List;

public class TestActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test2);
        List<String> res = new ArrayList<>();
        for (int i = 0; i < 11; i++) {
            res.add("肥宅快乐水" + i);
        }
        LogUtils.d(this, "res.size()---->" + res.size());
        TextFlowLayout textFlowLayout = findViewById(R.id.text_flow);
        textFlowLayout.setItemFlowClickListener(new TextFlowLayout.onItemFlowClickListener() {
            @Override
            public void onItemFlowClick(String text) {
                LogUtils.d(TestActivity2.this, "text---->" + text);
            }
        });
        textFlowLayout.setTextList(res);
    }
}